<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			当前计数：{{counter}}
			<!--<button v-on:click="counter++">+</button>
			<button v-on:click="counter--">-</button>-->
		
		<button @click="add()">+</button>
		<button v-on:click="jian()">-</button>
		
		</div>
		
		
		<script type="text/javascript">
			
			
			var obj = {
					counter:0					
				};
			
			const app = new Vue({
				el:'#app',
				data:obj,
				methods:{
					add:function(){
						this.counter++;
					},
					jian:function(){
						this.counter--;
					}
				}
			});
		</script>
	</body>
</html>
